package com.mall.controller;

import com.mall.domain.po.Role;
import com.mall.domain.response.Response;
import com.mall.service.RoleService;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Slf4j
@RestController
@RequestMapping("/role")
public class RoleController {

    @Resource
    private RoleService roleService;

    @GetMapping("/getRoles")
    public Response<List<Role>> getRoles(){
        return roleService.getRoles();
    }

}
